#include <bits/stdc++.h>
using namespace std;

#define N 1000000
struct Tree
{   
    int value;
    int l = -1, r = -1;
}tree[N];

void postorder(Tree a[N],int n)
{
    if(a[n].l != -1)postorder(a, a[n].l);
    if(a[n].r != -1)postorder(a, a[n].r);
    switch (a[n].value)
    {
    case 0:
        printf("B");
        break;
    case 1:
        printf("I");
        break;
    case 2:
        printf("F");
        break;
    }
}

int main()
{
    int n;
    scanf("%d", &n);
    int m = pow(2, n);
    for(int i = 0; i< m; i++)
    {
        scanf("%1d", &(tree[m + i].value));
        tree[m + i].value = tree[m + i].value;
    }
    for(int i = m-1; i>0; i--)
    {
        tree[i].l = 2*i;
        tree[i].r = 2*i + 1;
        if(tree[tree[i].l].value == tree[tree[i].r].value)
            tree[i].value = tree[tree[i].l].value;
        else tree[i].value = 2;
    }
    postorder(tree, 1);
    return 0;
}
